<template>
  <div class="orderDetail">
    <van-nav-bar
      title="订单详情"
      left-text="返回"
      left-arrow
      @click-left="back"
    />
    <div style="pointer-events: none">
      <van-contact-card
        type="edit"
        :name="information.name"
        :tel="information.phone"
        v-if="information.name"
      />
      <div class="card-title">
        <p>代发商品</p>
        <van-swipe-cell>
          <van-card
            :num="information.quantity"
            :price="information.money + '.00'"
            :desc="information.insideKey"
            :title="information.name"
            :thumb="information.goodsImg"
          >
          </van-card>
        </van-swipe-cell>
        <div class="card-content">
          <p style="width: 50%">配送时间</p>
          <p style="text-align: right; width: 50%">1-3天内发货</p>
        </div>
      </div>
      <div class="card-title">
        <p>订单备注</p>
        <van-field
          rows="1"
          autosize
          type="textarea"
          placeholder="请输入订单备注"
        />
      </div>
      <van-steps direction="vertical" :active="0">
        <van-step>
          <h3>发货中</h3>
          <p>{{ this.time1 }}</p>
        </van-step>
      </van-steps>
    </div>
  </div>
</template>

<script>
// import { Notify, Dialog } from "vant";
import moment from "moment";
export default {
  data() {
    return {
      information: {},
      time1: moment().format("YYYY-MM-DD HH:mm:ss"),
    };
  },
  created() {
    this.information = this.$route.params.item;
    this.time1 = moment().format("YYYY-MM-DD HH:mm:ss");
  },
  mounted() {
    console.log(this.time1);
  },
  methods: {
    back() {
      this.$router.go(-1);
    },
  },
};
</script>
<style scoped  lang="scss">
.orderDetail {
  width: 95%;
  margin: auto;

  .card-title {
    margin-top: 20px;
    background: #fff;
    margin-bottom: 55px;
    p {
      font-size: 16px;
      font-weight: 600;
    }
    .card-content {
      display: flex;
      p {
        font-weight: 500px;
        font-size: 12px;
      }
      margin-bottom: 10px;
    }
    .van-cell {
      padding: 15px 0;
    }
  }
}
</style>